package edu.kjxy.day02Synchronized.synchronizedMethodLockObject;

/**
 * 功能:
 * 作者:程序员欧阳子韩
 * 日期:2024/2/1 19:08
 */
public class MyObject {
    synchronized public void methodA(){
        try {
            System.out.println("begin methodA threadName=" + Thread.currentThread().getName());
            Thread.sleep(5000);
            System.out.println("end");
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }
}
